package org.scc.dao;

import java.util.List;

import org.scc.model.MeetingPlace;

public class MeetingPlaceDao extends BaseDao {

	@Override
	protected String getMapper(String methodName) {
		return "org.scc.sqlmap.MeetingPlaceMapper." + methodName;
	}

	/**
	 * 新增聚会地点
	 * 
	 * @param meetingPlace
	 */
	public void add(MeetingPlace meetingPlace) {
		insert(getMapper("add"), meetingPlace, "add meetingPlace error");
	}

	/**
	 * 查询所有聚会地点
	 * 
	 * @return
	 */
	public List<MeetingPlace> findAll() {
		return selectList( getMapper("findAll"), "findAll meetingPlace error" );
	}

	/**
	 * 更新聚会地点
	 * 
	 * @param meetingPlace
	 */
	public void update(MeetingPlace meetingPlace) {
		super.update( getMapper("update"), meetingPlace, "update meetingPlace error");
	}

	/**
	 * 加载聚会地点
	 * 
	 * @param id
	 * @return
	 */
	public MeetingPlace load(int id) {
		return selectOne( getMapper("load"), id, "load meetingPlace error");
	}

	/**
	 * 删除聚会地点
	 * 
	 * @param ids
	 */
	public void delete(String ids) {
		super.delete(getMapper("delete"), ids, "delete meetingPlace error");
	}

}
